<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
  <meta charset="utf-8" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />

  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <title>Core &mdash; Maximilian  documentation</title>
      <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
      <link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
  <!--[if lt IE 9]>
    <script src="_static/js/html5shiv.min.js"></script>
  <![endif]-->
  
        <script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
        <script src="_static/jquery.js"></script>
        <script src="_static/underscore.js"></script>
        <script src="_static/_sphinx_javascript_frameworks_compat.js"></script>
        <script src="_static/doctools.js"></script>
        <script src="_static/sphinx_highlight.js"></script>
    <script src="_static/js/theme.js"></script>
    <link rel="index" title="Index" href="genindex.html" />
    <link rel="search" title="Search" href="search.html" />
    <link rel="next" title="Extended" href="extended.html" />
    <link rel="prev" title="Installation" href="install.html" /> 
</head>

<body class="wy-body-for-nav"> 
  <div class="wy-grid-for-nav">
    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
      <div class="wy-side-scroll">
        <div class="wy-side-nav-search" >
            <a href="index.html" class="icon icon-home"> Maximilian
          </a>
<div role="search">
  <form id="rtd-search-form" class="wy-form" action="search.html" method="get">
    <input type="text" name="q" placeholder="Search docs" />
    <input type="hidden" name="check_keywords" value="yes" />
    <input type="hidden" name="area" value="default" />
  </form>
</div>
        </div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
              <p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="install.html">Installation</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">Core</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#generators">Generators</a></li>
<li class="toctree-l2"><a class="reference internal" href="#filters">Filters</a></li>
<li class="toctree-l2"><a class="reference internal" href="#dynamics">Dynamics</a></li>
<li class="toctree-l2"><a class="reference internal" href="#effects">Effects</a></li>
<li class="toctree-l2"><a class="reference internal" href="#analysis">Analysis</a></li>
<li class="toctree-l2"><a class="reference internal" href="#sequencing">Sequencing</a></li>
<li class="toctree-l2"><a class="reference internal" href="#utility-functions">Utility Functions</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="extended.html">Extended</a></li>
</ul>

        </div>
      </div>
    </nav>

    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
          <a href="index.html">Maximilian</a>
      </nav>

      <div class="wy-nav-content">
        <div class="rst-content">
          <div role="navigation" aria-label="Page navigation">
  <ul class="wy-breadcrumbs">
      <li><a href="index.html" class="icon icon-home"></a></li>
      <li class="breadcrumb-item active">Core</li>
      <li class="wy-breadcrumbs-aside">
            <a href="_sources/core.rst.txt" rel="nofollow"> View page source</a>
      </li>
  </ul>
  <hr/>
</div>
          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
           <div itemprop="articleBody">
             
  <section id="core">
<h1>Core<a class="headerlink" href="#core" title="Permalink to this heading"></a></h1>
<section id="generators">
<h2>Generators<a class="headerlink" href="#generators" title="Permalink to this heading"></a></h2>
<dl class="cpp class">
<dt class="sig sig-object cpp" id="_CPPv47maxiOsc">
<span id="_CPPv37maxiOsc"></span><span id="_CPPv27maxiOsc"></span><span id="maxiOsc"></span><span class="target" id="classmaxiOsc"></span><span class="k"><span class="pre">class</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">maxiOsc</span></span></span><a class="headerlink" href="#_CPPv47maxiOsc" title="Permalink to this definition"></a><br /></dt>
<dd><div class="breathe-sectiondef docutils container">
<p class="breathe-sectiondef-title rubric" id="breathe-section-title-public-functions">Public Functions</p>
<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N7maxiOsc6squareEd">
<span id="_CPPv3N7maxiOsc6squareEd"></span><span id="_CPPv2N7maxiOsc6squareEd"></span><span id="maxiOsc::square__double"></span><span class="target" id="classmaxiOsc_1a098187c5cca7e416439477d2f790a2e5"></span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">square</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">frequency</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N7maxiOsc6squareEd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Square wave oscillator </p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>frequency</strong> – in Hz </p>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N7maxiOsc8sinewaveEd">
<span id="_CPPv3N7maxiOsc8sinewaveEd"></span><span id="_CPPv2N7maxiOsc8sinewaveEd"></span><span id="maxiOsc::sinewave__double"></span><span class="target" id="classmaxiOsc_1a0a9fca78897f5def1e3202c976950f9c"></span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">sinewave</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">frequency</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N7maxiOsc8sinewaveEd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Sine wave oscillator </p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>frequency</strong> – in Hz </p>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N7maxiOsc7coswaveEd">
<span id="_CPPv3N7maxiOsc7coswaveEd"></span><span id="_CPPv2N7maxiOsc7coswaveEd"></span><span id="maxiOsc::coswave__double"></span><span class="target" id="classmaxiOsc_1aa7d05ba1f846e1d2b3c12f16f74b851a"></span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">coswave</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">frequency</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N7maxiOsc7coswaveEd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Cosine wave oscillator </p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>frequency</strong> – in Hz </p>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N7maxiOsc3sawEd">
<span id="_CPPv3N7maxiOsc3sawEd"></span><span id="_CPPv2N7maxiOsc3sawEd"></span><span id="maxiOsc::saw__double"></span><span class="target" id="classmaxiOsc_1aaf7c3d0064e46ce0e4e2c354d9ed37b8"></span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">saw</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">frequency</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N7maxiOsc3sawEd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Saw wave oscillator</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>frequency</strong> – in Hz </p>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N7maxiOsc6phasorEd">
<span id="_CPPv3N7maxiOsc6phasorEd"></span><span id="_CPPv2N7maxiOsc6phasorEd"></span><span id="maxiOsc::phasor__double"></span><span class="target" id="classmaxiOsc_1af6d7b7b4a167aa90d5bb54f2e2228da4"></span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">phasor</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">frequency</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N7maxiOsc6phasorEd" title="Permalink to this definition"></a><br /></dt>
<dd><p>A ramp rising from 0 to 1</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>frequency</strong> – in Hz </p>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N7maxiOsc13phasorBetweenEddd">
<span id="_CPPv3N7maxiOsc13phasorBetweenEddd"></span><span id="_CPPv2N7maxiOsc13phasorBetweenEddd"></span><span id="maxiOsc::phasorBetween__double.double.double"></span><span class="target" id="classmaxiOsc_1aa64f53d111cfc0c1d8acf3c76b1249be"></span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">phasorBetween</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">frequency</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">startphase</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">endphase</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N7maxiOsc13phasorBetweenEddd" title="Permalink to this definition"></a><br /></dt>
<dd><p>A ramp rising from 0 to 1</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>frequency</strong> – in Hz </p></li>
<li><p><strong>startPhase</strong> – the start point of the phasor (0-1) </p></li>
<li><p><strong>endPhase</strong> – the end point of the phasor (0-1) </p></li>
</ul>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N7maxiOsc8triangleEd">
<span id="_CPPv3N7maxiOsc8triangleEd"></span><span id="_CPPv2N7maxiOsc8triangleEd"></span><span id="maxiOsc::triangle__double"></span><span class="target" id="classmaxiOsc_1ac846ac3de1a73c03b8d9afc0eba39df3"></span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">triangle</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">frequency</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N7maxiOsc8triangleEd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Triangle oscillator</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>frequency</strong> – in Hz </p>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N7maxiOsc5pulseEdd">
<span id="_CPPv3N7maxiOsc5pulseEdd"></span><span id="_CPPv2N7maxiOsc5pulseEdd"></span><span id="maxiOsc::pulse__double.double"></span><span class="target" id="classmaxiOsc_1a69780c8da87b6ebc3597f72025d502ae"></span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">pulse</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">frequency</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">duty</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N7maxiOsc5pulseEdd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Pulse wave oscillator</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>frequency</strong> – in Hz</p></li>
<li><p><strong>duty</strong> – Pulse width (0-1) </p></li>
</ul>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N7maxiOsc7impulseEd">
<span id="_CPPv3N7maxiOsc7impulseEd"></span><span id="_CPPv2N7maxiOsc7impulseEd"></span><span id="maxiOsc::impulse__double"></span><span class="target" id="classmaxiOsc_1aba124622a61301d7763a5bf57a025a57"></span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">impulse</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">frequency</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N7maxiOsc7impulseEd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Impulse generator</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>frequency</strong> – in Hz </p>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N7maxiOsc7sinebufEd">
<span id="_CPPv3N7maxiOsc7sinebufEd"></span><span id="_CPPv2N7maxiOsc7sinebufEd"></span><span id="maxiOsc::sinebuf__double"></span><span class="target" id="classmaxiOsc_1af1ee1a5b8f291ac082edc56f4e192652"></span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">sinebuf</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">frequency</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N7maxiOsc7sinebufEd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Fast sine wave oscillator, generated from a wavetable with linear interpolation</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>frequency</strong> – in Hz </p>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N7maxiOsc5noiseEv">
<span id="_CPPv3N7maxiOsc5noiseEv"></span><span id="_CPPv2N7maxiOsc5noiseEv"></span><span id="maxiOsc::noise"></span><span class="target" id="classmaxiOsc_1abc35e908713ec53d584e38330bf63c57"></span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">noise</span></span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N7maxiOsc5noiseEv" title="Permalink to this definition"></a><br /></dt>
<dd><p>White noise generator </p>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N7maxiOsc8sinebuf4Ed">
<span id="_CPPv3N7maxiOsc8sinebuf4Ed"></span><span id="_CPPv2N7maxiOsc8sinebuf4Ed"></span><span id="maxiOsc::sinebuf4__double"></span><span class="target" id="classmaxiOsc_1a0df1f7890617df92a08e29026f27936b"></span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">sinebuf4</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">frequency</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N7maxiOsc8sinebuf4Ed" title="Permalink to this definition"></a><br /></dt>
<dd><p>Fast sine wave oscillator, generated from a wavetable with quadratic interpolation</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>frequency</strong> – in Hz </p>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N7maxiOsc4sawnEd">
<span id="_CPPv3N7maxiOsc4sawnEd"></span><span id="_CPPv2N7maxiOsc4sawnEd"></span><span id="maxiOsc::sawn__double"></span><span class="target" id="classmaxiOsc_1ae6ff9fadfe052e8fdfb800be94e748b9"></span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">sawn</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">frequency</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N7maxiOsc4sawnEd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Anti-aliases saw wave oscillator</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>frequency</strong> – in Hz </p>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N7maxiOsc10phaseResetEd">
<span id="_CPPv3N7maxiOsc10phaseResetEd"></span><span id="_CPPv2N7maxiOsc10phaseResetEd"></span><span id="maxiOsc::phaseReset__double"></span><span class="target" id="classmaxiOsc_1a42752809b4622af434efcb375e498daa"></span><span class="kt"><span class="pre">void</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">phaseReset</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">phaseIn</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N7maxiOsc10phaseResetEd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Set the phase of the oscillator</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>phaseIn</strong> – The phase, from 0 to 1 </p>
</dd>
</dl>
</dd></dl>

</div>
</dd></dl>

<dl class="cpp class">
<dt class="sig sig-object cpp" id="_CPPv412maxiPolyBLEP">
<span id="_CPPv312maxiPolyBLEP"></span><span id="_CPPv212maxiPolyBLEP"></span><span id="maxiPolyBLEP"></span><span class="target" id="classmaxiPolyBLEP"></span><span class="k"><span class="pre">class</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">maxiPolyBLEP</span></span></span><a class="headerlink" href="#_CPPv412maxiPolyBLEP" title="Permalink to this definition"></a><br /></dt>
<dd><p>Anti-aliased oscillators; </p>
<div class="breathe-sectiondef docutils container">
<p class="breathe-sectiondef-title rubric" id="breathe-section-title-public-types">Public Types</p>
<dl class="cpp type">
<dt class="sig sig-object cpp" id="_CPPv4N12maxiPolyBLEP8WaveformE">
<span id="_CPPv3N12maxiPolyBLEP8WaveformE"></span><span id="_CPPv2N12maxiPolyBLEP8WaveformE"></span><span class="target" id="classmaxiPolyBLEP_1a6adb656a95c88c2ae9e9b4b1a4dc6b42"></span><span class="k"><span class="pre">using</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">Waveform</span></span></span><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="n"><span class="pre">PolyBLEP</span></span><span class="p"><span class="pre">::</span></span><span class="n"><span class="pre">Waveform</span></span><a class="headerlink" href="#_CPPv4N12maxiPolyBLEP8WaveformE" title="Permalink to this definition"></a><br /></dt>
<dd><p>Waveform types: SINE, COSINE, TRIANGLE, SQUARE, RECTANGLE, SAWTOOTH, RAMP, MODIFIED_TRIANGLE, MODIFIED_SQUARE, HALF_WAVE_RECTIFIED_SINE, FULL_WAVE_RECTIFIED_SINE, TRIANGULAR_PULSE, TRAPEZOID_FIXED, TRAPEZOID_VARIABLE </p>
</dd></dl>

</div>
<div class="breathe-sectiondef docutils container">
<p class="breathe-sectiondef-title rubric" id="breathe-section-title-public-functions">Public Functions</p>
<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N12maxiPolyBLEP12maxiPolyBLEPEv">
<span id="_CPPv3N12maxiPolyBLEP12maxiPolyBLEPEv"></span><span id="_CPPv2N12maxiPolyBLEP12maxiPolyBLEPEv"></span><span id="maxiPolyBLEP::maxiPolyBLEP"></span><span class="target" id="classmaxiPolyBLEP_1ab41c3fc1529f98d04a031b677a37018e"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">maxiPolyBLEP</span></span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N12maxiPolyBLEP12maxiPolyBLEPEv" title="Permalink to this definition"></a><br /></dt>
<dd><p>Constructor </p>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N12maxiPolyBLEP4playEd">
<span id="_CPPv3N12maxiPolyBLEP4playEd"></span><span id="_CPPv2N12maxiPolyBLEP4playEd"></span><span id="maxiPolyBLEP::play__double"></span><span class="target" id="classmaxiPolyBLEP_1ae5c00dfb703b0ddacf2801fe0a91af8d"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">play</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">freq</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N12maxiPolyBLEP4playEd" title="Permalink to this definition"></a><br /></dt>
<dd><p>play the oscillator </p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>freq</strong> – frequency in Hz </p>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N12maxiPolyBLEP11setWaveformE8Waveform">
<span id="_CPPv3N12maxiPolyBLEP11setWaveformE8Waveform"></span><span id="_CPPv2N12maxiPolyBLEP11setWaveformE8Waveform"></span><span id="maxiPolyBLEP::setWaveform__Waveform"></span><span class="target" id="classmaxiPolyBLEP_1a88cc2d36108a59e58788faa6a46e4519"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">void</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">setWaveform</span></span></span><span class="sig-paren">(</span><a class="reference internal" href="#_CPPv4N12maxiPolyBLEP8WaveformE" title="maxiPolyBLEP::Waveform"><span class="n"><span class="pre">Waveform</span></span></a><span class="w"> </span><span class="n sig-param"><span class="pre">waveform</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N12maxiPolyBLEP11setWaveformE8Waveform" title="Permalink to this definition"></a><br /></dt>
<dd><p>Set the waveform type </p>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N12maxiPolyBLEP13setPulseWidthEd">
<span id="_CPPv3N12maxiPolyBLEP13setPulseWidthEd"></span><span id="_CPPv2N12maxiPolyBLEP13setPulseWidthEd"></span><span id="maxiPolyBLEP::setPulseWidth__double"></span><span class="target" id="classmaxiPolyBLEP_1a0538958437a77d7a41833446b7ea0fa8"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">void</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">setPulseWidth</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">pw</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N12maxiPolyBLEP13setPulseWidthEd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Change the pulse width (0 &lt;= pw &lt;= 1) </p>
</dd></dl>

</div>
</dd></dl>

<dl class="cpp class">
<dt class="sig sig-object cpp" id="_CPPv410maxiEnvGen">
<span id="_CPPv310maxiEnvGen"></span><span id="_CPPv210maxiEnvGen"></span><span id="maxiEnvGen"></span><span class="target" id="classmaxiEnvGen"></span><span class="k"><span class="pre">class</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">maxiEnvGen</span></span></span><a class="headerlink" href="#_CPPv410maxiEnvGen" title="Permalink to this definition"></a><br /></dt>
<dd><p>An envelope generator. </p>
<div class="breathe-sectiondef docutils container">
<p class="breathe-sectiondef-title rubric" id="breathe-section-title-public-functions">Public Functions</p>
<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N10maxiEnvGen4playEd">
<span id="_CPPv3N10maxiEnvGen4playEd"></span><span id="_CPPv2N10maxiEnvGen4playEd"></span><span id="maxiEnvGen::play__double"></span><span class="target" id="classmaxiEnvGen_1a96e2ba32a6c33be15cadbaece6181c45"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">play</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">trigger</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N10maxiEnvGen4playEd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Get the latest value of the envelope</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>trigger</strong> – A positive zero crossing (or constant 1) starts the envelope </p>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N10maxiEnvGen5setupE11DOUBLEARRAY11DOUBLEARRAY11DOUBLEARRAYbb">
<span id="_CPPv3N10maxiEnvGen5setupE11DOUBLEARRAY11DOUBLEARRAY11DOUBLEARRAYbb"></span><span id="_CPPv2N10maxiEnvGen5setupE11DOUBLEARRAY11DOUBLEARRAY11DOUBLEARRAYbb"></span><span id="maxiEnvGen::setup__DOUBLEARRAY.DOUBLEARRAY.DOUBLEARRAY.b.b"></span><span class="target" id="classmaxiEnvGen_1ab0a6e01b809090475d41072fd33cc8e2"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">bool</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">setup</span></span></span><span class="sig-paren">(</span><span class="n"><span class="pre">DOUBLEARRAY</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">levels</span></span>, <span class="n"><span class="pre">DOUBLEARRAY</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">times</span></span>, <span class="n"><span class="pre">DOUBLEARRAY</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">curves</span></span>, <span class="kt"><span class="pre">bool</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">looping</span></span>, <span class="kt"><span class="pre">bool</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">allowRetrigger</span></span><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="k"><span class="pre">false</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N10maxiEnvGen5setupE11DOUBLEARRAY11DOUBLEARRAY11DOUBLEARRAYbb" title="Permalink to this definition"></a><br /></dt>
<dd><p>Configure the envelope generator </p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>levels</strong> – An array of levels </p></li>
<li><p><strong>times</strong> – An array of times between the levels, in milliseconds. To make the envelope hold until the first negative zero crossing, use maxiEnvGen::HOLD as the time. Only one hold segment is allowed. </p></li>
<li><p><strong>curves</strong> – An array of exponential curve values to shape each segment (1 = straight, 2= squared, 0.5 = square root etc) </p></li>
<li><p><strong>looping</strong> – True if the envelope should infinitely repeat </p></li>
<li><p><strong>allowRetrigger</strong> – Set to true if the envelope should allow retriggering before it is finished, or false if the envelope should always reach the end before being allowed to restart Example C++ usage env.setup({0,1,0},{100,400}, {0.5,1}, false). levels should be one element longer than times and curves </p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>True if the configuration was successful </p>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N10maxiEnvGen5resetEv">
<span id="_CPPv3N10maxiEnvGen5resetEv"></span><span id="_CPPv2N10maxiEnvGen5resetEv"></span><span id="maxiEnvGen::reset"></span><span class="target" id="classmaxiEnvGen_1a0a4c8291678ffd7b78a272871be940e8"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">void</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">reset</span></span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N10maxiEnvGen5resetEv" title="Permalink to this definition"></a><br /></dt>
<dd><p>Restart the envelope immeadiately </p>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N10maxiEnvGen11resetAndArmEv">
<span id="_CPPv3N10maxiEnvGen11resetAndArmEv"></span><span id="_CPPv2N10maxiEnvGen11resetAndArmEv"></span><span id="maxiEnvGen::resetAndArm"></span><span class="target" id="classmaxiEnvGen_1a2c39708258a5c71a40530d7473024b27"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">void</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">resetAndArm</span></span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N10maxiEnvGen11resetAndArmEv" title="Permalink to this definition"></a><br /></dt>
<dd><p>Stop the envelope and wait for a new trigger to start it </p>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N10maxiEnvGen8setLevelE6size_td">
<span id="_CPPv3N10maxiEnvGen8setLevelE6size_td"></span><span id="_CPPv2N10maxiEnvGen8setLevelE6size_td"></span><span id="maxiEnvGen::setLevel__s.double"></span><span class="target" id="classmaxiEnvGen_1a42b258340290e2d6c8ccddcf87198600"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">bool</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">setLevel</span></span></span><span class="sig-paren">(</span><span class="n"><span class="pre">size_t</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">index</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">value</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N10maxiEnvGen8setLevelE6size_td" title="Permalink to this definition"></a><br /></dt>
<dd><p>Set the level of a segment of the envelope</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>index</strong> – The index of the level</p></li>
<li><p><strong>value</strong> – The new level </p></li>
</ul>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N10maxiEnvGen8setCurveE6size_td">
<span id="_CPPv3N10maxiEnvGen8setCurveE6size_td"></span><span id="_CPPv2N10maxiEnvGen8setCurveE6size_td"></span><span id="maxiEnvGen::setCurve__s.double"></span><span class="target" id="classmaxiEnvGen_1adddbd06ed361eb21599fad5c0bad19c2"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">bool</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">setCurve</span></span></span><span class="sig-paren">(</span><span class="n"><span class="pre">size_t</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">index</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">value</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N10maxiEnvGen8setCurveE6size_td" title="Permalink to this definition"></a><br /></dt>
<dd><p>Set the curve of a segment of the envelope</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>index</strong> – The index of the segment</p></li>
<li><p><strong>value</strong> – The new curve value </p></li>
</ul>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N10maxiEnvGen7setTimeE6size_td">
<span id="_CPPv3N10maxiEnvGen7setTimeE6size_td"></span><span id="_CPPv2N10maxiEnvGen7setTimeE6size_td"></span><span id="maxiEnvGen::setTime__s.double"></span><span class="target" id="classmaxiEnvGen_1a796ee97222111ff69c96956d9127ed33"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">bool</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">setTime</span></span></span><span class="sig-paren">(</span><span class="n"><span class="pre">size_t</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">index</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">value</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N10maxiEnvGen7setTimeE6size_td" title="Permalink to this definition"></a><br /></dt>
<dd><p>Set the length of a segment of the envelope</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>index</strong> – The index of the segment</p></li>
<li><p><strong>value</strong> – The new length (in ms) </p></li>
</ul>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N10maxiEnvGen7setupAREKdKd">
<span id="_CPPv3N10maxiEnvGen7setupAREKdKd"></span><span id="_CPPv2N10maxiEnvGen7setupAREKdKd"></span><span id="maxiEnvGen::setupAR__doubleC.doubleC"></span><span class="target" id="classmaxiEnvGen_1a6147e310dbdbfab4269508ba25689f49"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">void</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">setupAR</span></span></span><span class="sig-paren">(</span><span class="k"><span class="pre">const</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">attack</span></span>, <span class="k"><span class="pre">const</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">release</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N10maxiEnvGen7setupAREKdKd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Helper function to create a triangular envelope </p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>attack</strong> – Rise time in ms </p></li>
<li><p><strong>release</strong> – Fall time in ms </p></li>
</ul>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N10maxiEnvGen8setupASREKdKd">
<span id="_CPPv3N10maxiEnvGen8setupASREKdKd"></span><span id="_CPPv2N10maxiEnvGen8setupASREKdKd"></span><span id="maxiEnvGen::setupASR__doubleC.doubleC"></span><span class="target" id="classmaxiEnvGen_1a74880edb5d611ab0f0838427cb2ac2bb"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">void</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">setupASR</span></span></span><span class="sig-paren">(</span><span class="k"><span class="pre">const</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">attack</span></span>, <span class="k"><span class="pre">const</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">release</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N10maxiEnvGen8setupASREKdKd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Helper function to create a triangular(ish) envelope with sustain section at peak The sustain section will end when the trigger input drops below 0 </p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>attack</strong> – Rise time in ms </p></li>
<li><p><strong>release</strong> – Fall time in ms </p></li>
</ul>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N10maxiEnvGen9setupADSREKdKdKdKd">
<span id="_CPPv3N10maxiEnvGen9setupADSREKdKdKdKd"></span><span id="_CPPv2N10maxiEnvGen9setupADSREKdKdKdKd"></span><span id="maxiEnvGen::setupADSR__doubleC.doubleC.doubleC.doubleC"></span><span class="target" id="classmaxiEnvGen_1af7d01608fa1a7e184922af2334cfbd20"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">void</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">setupADSR</span></span></span><span class="sig-paren">(</span><span class="k"><span class="pre">const</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">attack</span></span>, <span class="k"><span class="pre">const</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">decay</span></span>, <span class="k"><span class="pre">const</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">sustain</span></span>, <span class="k"><span class="pre">const</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">release</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N10maxiEnvGen9setupADSREKdKdKdKd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Helper function to create an attack-decay-sustain-release envelope The sustain section will end when the trigger input drops below 0 The envelope will rise from 0 to 1 in the attack segment, then drop to the sustain level before falling to 0. </p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>attack</strong> – Rise time in ms </p></li>
<li><p><strong>decay</strong> – Decay time in ms </p></li>
<li><p><strong>sustain</strong> – Sustain level </p></li>
<li><p><strong>release</strong> – Fall time in ms </p></li>
</ul>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N10maxiEnvGen12setRetriggerEKb">
<span id="_CPPv3N10maxiEnvGen12setRetriggerEKb"></span><span id="_CPPv2N10maxiEnvGen12setRetriggerEKb"></span><span id="maxiEnvGen::setRetrigger__bC"></span><span class="target" id="classmaxiEnvGen_1a0c2ef3a75479c03c8b2da3b92463179b"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">void</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">setRetrigger</span></span></span><span class="sig-paren">(</span><span class="k"><span class="pre">const</span></span><span class="w"> </span><span class="kt"><span class="pre">bool</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">val</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N10maxiEnvGen12setRetriggerEKb" title="Permalink to this definition"></a><br /></dt>
<dd><p>Set the envelope to retrigger or not</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>val</strong> – True is the envelope should retrigger, false if not </p>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N10maxiEnvGen12getRetriggerEv">
<span id="_CPPv3N10maxiEnvGen12getRetriggerEv"></span><span id="_CPPv2N10maxiEnvGen12getRetriggerEv"></span><span id="maxiEnvGen::getRetrigger"></span><span class="target" id="classmaxiEnvGen_1ab4efdf967063ed0fa6273a86802ccf86"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">bool</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">getRetrigger</span></span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N10maxiEnvGen12getRetriggerEv" title="Permalink to this definition"></a><br /></dt>
<dd><p>Find out if the envelope retriggers </p>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N10maxiEnvGen7setLoopEKb">
<span id="_CPPv3N10maxiEnvGen7setLoopEKb"></span><span id="_CPPv2N10maxiEnvGen7setLoopEKb"></span><span id="maxiEnvGen::setLoop__bC"></span><span class="target" id="classmaxiEnvGen_1a2c15ef4a7b33ba598ecf4a74f159d158"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">void</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">setLoop</span></span></span><span class="sig-paren">(</span><span class="k"><span class="pre">const</span></span><span class="w"> </span><span class="kt"><span class="pre">bool</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">val</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N10maxiEnvGen7setLoopEKb" title="Permalink to this definition"></a><br /></dt>
<dd><p>Set the envelope to loop or not</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>val</strong> – True is the envelope should loop, false if not </p>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N10maxiEnvGen7getLoopEv">
<span id="_CPPv3N10maxiEnvGen7getLoopEv"></span><span id="_CPPv2N10maxiEnvGen7getLoopEv"></span><span id="maxiEnvGen::getLoop"></span><span class="target" id="classmaxiEnvGen_1a048d75d16095cb694bb4609136196867"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">bool</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">getLoop</span></span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N10maxiEnvGen7getLoopEv" title="Permalink to this definition"></a><br /></dt>
<dd><p>Find out if the envelope loops </p>
</dd></dl>

</div>
</dd></dl>

</section>
<section id="filters">
<h2>Filters<a class="headerlink" href="#filters" title="Permalink to this heading"></a></h2>
<dl class="cpp class">
<dt class="sig sig-object cpp" id="_CPPv47maxiSVF">
<span id="_CPPv37maxiSVF"></span><span id="_CPPv27maxiSVF"></span><span id="maxiSVF"></span><span class="target" id="classmaxiSVF"></span><span class="k"><span class="pre">class</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">maxiSVF</span></span></span><a class="headerlink" href="#_CPPv47maxiSVF" title="Permalink to this definition"></a><br /></dt>
<dd><p>State Variable Filter</p>
<p>algorithm from <a class="reference external" href="http://www.cytomic.com/files/dsp/SvfLinearTrapOptimised.pdf">http://www.cytomic.com/files/dsp/SvfLinearTrapOptimised.pdf</a> usage:</p>
<p>filter.setCutoff(param1); filter.setResonance(param2);</p>
<p>w = filter.play(w, 0.0, 1.0, 0.0, 0.0); </p>
<div class="breathe-sectiondef docutils container">
<p class="breathe-sectiondef-title rubric" id="breathe-section-title-public-functions">Public Functions</p>
<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N7maxiSVF9setCutoffEd">
<span id="_CPPv3N7maxiSVF9setCutoffEd"></span><span id="_CPPv2N7maxiSVF9setCutoffEd"></span><span id="maxiSVF::setCutoff__double"></span><span class="target" id="classmaxiSVF_1a2ef7577baa3fe7f6357f9e2ad297ca2c"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">void</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">setCutoff</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">cutoff</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N7maxiSVF9setCutoffEd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Set the cutoff frequency</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>cutoff</strong> – Cuttoff frequency (20 &lt; cutoff &lt; 20000) </p>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N7maxiSVF12setResonanceEd">
<span id="_CPPv3N7maxiSVF12setResonanceEd"></span><span id="_CPPv2N7maxiSVF12setResonanceEd"></span><span id="maxiSVF::setResonance__double"></span><span class="target" id="classmaxiSVF_1afd0a82425008a52ee08a8f1f53607bd8"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">void</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">setResonance</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">q</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N7maxiSVF12setResonanceEd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Set the resonance of the filter</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>q</strong> – From 0 upwards, starts to ring from 2-3ish, cracks a bit around 10 </p>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N7maxiSVF4playEddddd">
<span id="_CPPv3N7maxiSVF4playEddddd"></span><span id="_CPPv2N7maxiSVF4playEddddd"></span><span id="maxiSVF::play__double.double.double.double.double"></span><span class="target" id="classmaxiSVF_1a09f66ad10878865f3254b735313df947"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">play</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">w</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">lpmix</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">bpmix</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">hpmix</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">notchmix</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N7maxiSVF4playEddddd" title="Permalink to this definition"></a><br /></dt>
<dd><p>run the filter, and get a mixture of lowpass, bandpass, highpass and notch outputs </p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>w</strong> – The signal to be filtered </p></li>
<li><p><strong>lpmix</strong> – the amount of low pass filtering (0-1) </p></li>
<li><p><strong>bpmix</strong> – the amount of bandpass pass filtering (0-1) </p></li>
<li><p><strong>hpmix</strong> – the amount of high pass filtering (0-1) </p></li>
<li><p><strong>notchmix</strong> – the amount of notch filtering (0-1) </p></li>
</ul>
</dd>
</dl>
</dd></dl>

</div>
</dd></dl>

<dl class="cpp class">
<dt class="sig sig-object cpp" id="_CPPv410maxiBiquad">
<span id="_CPPv310maxiBiquad"></span><span id="_CPPv210maxiBiquad"></span><span id="maxiBiquad"></span><span class="target" id="classmaxiBiquad"></span><span class="k"><span class="pre">class</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">maxiBiquad</span></span></span><a class="headerlink" href="#_CPPv410maxiBiquad" title="Permalink to this definition"></a><br /></dt>
<dd><p>Biquad filters based on <a class="reference external" href="http://www.earlevel.com/main/2011/01/02/biquad-formulas/">http://www.earlevel.com/main/2011/01/02/biquad-formulas/</a> and <a class="reference external" href="https://ccrma.stanford.edu/~jos/fp/Direct_Form_II.html">https://ccrma.stanford.edu/~jos/fp/Direct_Form_II.html</a> </p>
<div class="breathe-sectiondef docutils container">
<p class="breathe-sectiondef-title rubric" id="breathe-section-title-public-types">Public Types</p>
<dl class="cpp enum">
<dt class="sig sig-object cpp" id="_CPPv4N10maxiBiquad11filterTypesE">
<span id="_CPPv3N10maxiBiquad11filterTypesE"></span><span id="_CPPv2N10maxiBiquad11filterTypesE"></span><span class="target" id="classmaxiBiquad_1afdc6a07de436e1eb9b56d07e56de98c2"></span><span class="k"><span class="pre">enum</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">filterTypes</span></span></span><a class="headerlink" href="#_CPPv4N10maxiBiquad11filterTypesE" title="Permalink to this definition"></a><br /></dt>
<dd><p>A variety of filter types </p>
<p><em>Values:</em></p>
<dl class="cpp enumerator">
<dt class="sig sig-object cpp" id="_CPPv4N10maxiBiquad11filterTypes7LOWPASSE">
<span id="_CPPv3N10maxiBiquad11filterTypes7LOWPASSE"></span><span id="_CPPv2N10maxiBiquad11filterTypes7LOWPASSE"></span><span class="target" id="classmaxiBiquad_1afdc6a07de436e1eb9b56d07e56de98c2ab12b6b727fb8ce70410a06a721d0326a"></span><span class="k"><span class="pre">enumerator</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">LOWPASS</span></span></span><a class="headerlink" href="#_CPPv4N10maxiBiquad11filterTypes7LOWPASSE" title="Permalink to this definition"></a><br /></dt>
<dd></dd></dl>

<dl class="cpp enumerator">
<dt class="sig sig-object cpp" id="_CPPv4N10maxiBiquad11filterTypes8HIGHPASSE">
<span id="_CPPv3N10maxiBiquad11filterTypes8HIGHPASSE"></span><span id="_CPPv2N10maxiBiquad11filterTypes8HIGHPASSE"></span><span class="target" id="classmaxiBiquad_1afdc6a07de436e1eb9b56d07e56de98c2a86955103441dd37cb1f704d5e3cac234"></span><span class="k"><span class="pre">enumerator</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">HIGHPASS</span></span></span><a class="headerlink" href="#_CPPv4N10maxiBiquad11filterTypes8HIGHPASSE" title="Permalink to this definition"></a><br /></dt>
<dd></dd></dl>

<dl class="cpp enumerator">
<dt class="sig sig-object cpp" id="_CPPv4N10maxiBiquad11filterTypes8BANDPASSE">
<span id="_CPPv3N10maxiBiquad11filterTypes8BANDPASSE"></span><span id="_CPPv2N10maxiBiquad11filterTypes8BANDPASSE"></span><span class="target" id="classmaxiBiquad_1afdc6a07de436e1eb9b56d07e56de98c2a60625ec3a18e510b032d5a2bd072ae99"></span><span class="k"><span class="pre">enumerator</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">BANDPASS</span></span></span><a class="headerlink" href="#_CPPv4N10maxiBiquad11filterTypes8BANDPASSE" title="Permalink to this definition"></a><br /></dt>
<dd></dd></dl>

<dl class="cpp enumerator">
<dt class="sig sig-object cpp" id="_CPPv4N10maxiBiquad11filterTypes5NOTCHE">
<span id="_CPPv3N10maxiBiquad11filterTypes5NOTCHE"></span><span id="_CPPv2N10maxiBiquad11filterTypes5NOTCHE"></span><span class="target" id="classmaxiBiquad_1afdc6a07de436e1eb9b56d07e56de98c2a50f53f0e198cdedd044144d4097e3e29"></span><span class="k"><span class="pre">enumerator</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">NOTCH</span></span></span><a class="headerlink" href="#_CPPv4N10maxiBiquad11filterTypes5NOTCHE" title="Permalink to this definition"></a><br /></dt>
<dd></dd></dl>

<dl class="cpp enumerator">
<dt class="sig sig-object cpp" id="_CPPv4N10maxiBiquad11filterTypes4PEAKE">
<span id="_CPPv3N10maxiBiquad11filterTypes4PEAKE"></span><span id="_CPPv2N10maxiBiquad11filterTypes4PEAKE"></span><span class="target" id="classmaxiBiquad_1afdc6a07de436e1eb9b56d07e56de98c2a97ccbd1a53a437d1b3ca46cd07b5e850"></span><span class="k"><span class="pre">enumerator</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">PEAK</span></span></span><a class="headerlink" href="#_CPPv4N10maxiBiquad11filterTypes4PEAKE" title="Permalink to this definition"></a><br /></dt>
<dd></dd></dl>

<dl class="cpp enumerator">
<dt class="sig sig-object cpp" id="_CPPv4N10maxiBiquad11filterTypes8LOWSHELFE">
<span id="_CPPv3N10maxiBiquad11filterTypes8LOWSHELFE"></span><span id="_CPPv2N10maxiBiquad11filterTypes8LOWSHELFE"></span><span class="target" id="classmaxiBiquad_1afdc6a07de436e1eb9b56d07e56de98c2a370fb7faddd90af12dbdd8dc152e1478"></span><span class="k"><span class="pre">enumerator</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">LOWSHELF</span></span></span><a class="headerlink" href="#_CPPv4N10maxiBiquad11filterTypes8LOWSHELFE" title="Permalink to this definition"></a><br /></dt>
<dd></dd></dl>

<dl class="cpp enumerator">
<dt class="sig sig-object cpp" id="_CPPv4N10maxiBiquad11filterTypes9HIGHSHELFE">
<span id="_CPPv3N10maxiBiquad11filterTypes9HIGHSHELFE"></span><span id="_CPPv2N10maxiBiquad11filterTypes9HIGHSHELFE"></span><span class="target" id="classmaxiBiquad_1afdc6a07de436e1eb9b56d07e56de98c2abbf497f0dd07907392446d2bdaffbfdf"></span><span class="k"><span class="pre">enumerator</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">HIGHSHELF</span></span></span><a class="headerlink" href="#_CPPv4N10maxiBiquad11filterTypes9HIGHSHELFE" title="Permalink to this definition"></a><br /></dt>
<dd></dd></dl>

</dd></dl>

</div>
<div class="breathe-sectiondef docutils container">
<p class="breathe-sectiondef-title rubric" id="breathe-section-title-public-functions">Public Functions</p>
<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N10maxiBiquad4playEd">
<span id="_CPPv3N10maxiBiquad4playEd"></span><span id="_CPPv2N10maxiBiquad4playEd"></span><span id="maxiBiquad::play__double"></span><span class="target" id="classmaxiBiquad_1ac601f5a099d4517a1e9eac04f9ebd371"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">play</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">input</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N10maxiBiquad4playEd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Process a signal through the filter</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>input</strong> – A signal </p>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N10maxiBiquad3setE11filterTypesddd">
<span id="_CPPv3N10maxiBiquad3setE11filterTypesddd"></span><span id="_CPPv2N10maxiBiquad3setE11filterTypesddd"></span><span id="maxiBiquad::set__filterTypes.double.double.double"></span><span class="target" id="classmaxiBiquad_1a2e86cf2367c1b6fc1e089cf324c7ff6f"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">void</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">set</span></span></span><span class="sig-paren">(</span><a class="reference internal" href="#_CPPv4N10maxiBiquad11filterTypesE" title="maxiBiquad::filterTypes"><span class="n"><span class="pre">filterTypes</span></span></a><span class="w"> </span><span class="n sig-param"><span class="pre">filtType</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">cutoff</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">Q</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">peakGain</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N10maxiBiquad3setE11filterTypesddd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Configure the filter </p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>filtType</strong> – The type of filter, set from <a class="reference internal" href="#classmaxiBiquad_1afdc6a07de436e1eb9b56d07e56de98c2"><span class="std std-ref">maxiBiquad::filterTypes</span></a> </p></li>
<li><p><strong>cutoff</strong> – The filter cutoff frequency in Hz </p></li>
<li><p><strong>Q</strong> – The resonance of the filter </p></li>
<li><p><strong>peakGain</strong> – The gain of the filter (only used for PEAK, HIGHSHELF and LOWSHELF) </p></li>
</ul>
</dd>
</dl>
</dd></dl>

</div>
</dd></dl>

</section>
<section id="dynamics">
<h2>Dynamics<a class="headerlink" href="#dynamics" title="Permalink to this heading"></a></h2>
<dl class="cpp class">
<dt class="sig sig-object cpp" id="_CPPv412maxiDynamics">
<span id="_CPPv312maxiDynamics"></span><span id="_CPPv212maxiDynamics"></span><span id="maxiDynamics"></span><span class="target" id="classmaxiDynamics"></span><span class="k"><span class="pre">class</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">maxiDynamics</span></span></span><a class="headerlink" href="#_CPPv412maxiDynamics" title="Permalink to this definition"></a><br /></dt>
<dd><p>The class provides a range of dynamics processing: downward and upward compression, downward and upward expansion, sidechaining, attack and release, lookahead and peak or RMS detection </p>
<div class="breathe-sectiondef docutils container">
<p class="breathe-sectiondef-title rubric" id="breathe-section-title-public-functions">Public Functions</p>
<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N12maxiDynamics4playEdddddddd">
<span id="_CPPv3N12maxiDynamics4playEdddddddd"></span><span id="_CPPv2N12maxiDynamics4playEdddddddd"></span><span id="maxiDynamics::play__double.double.double.double.double.double.double.double"></span><span class="target" id="classmaxiDynamics_1a79a4f30d45aabb964405fde5aaa6829c"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">play</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">sig</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">control</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">thresholdHigh</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">ratioHigh</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">kneeHigh</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">thresholdLow</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">ratioLow</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">kneeLow</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N12maxiDynamics4playEdddddddd" title="Permalink to this definition"></a><br /></dt>
<dd><p>This functions compands the signal, providing download compression or upward expansion above an upper thresold, and upward compression or downward expansion below a lower threshold. </p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>sig</strong> – The input signal to be companded </p></li>
<li><p><strong>control</strong> – This signal is used to trigger the compander. Use it for sidechaining, or if no sidechain is needed, use the same signal for this and the input signal </p></li>
<li><p><strong>thresholdHigh</strong> – The high threshold, in Dbs </p></li>
<li><p><strong>ratioHigh</strong> – The ratio for companding above the high threshold </p></li>
<li><p><strong>kneeHigh</strong> – The size of the knee for companding above the high threshold (in Dbs) </p></li>
<li><p><strong>thresholdLow</strong> – The low threshold, in Dbs </p></li>
<li><p><strong>ratioLow</strong> – The ratio for companding below the low threshold </p></li>
<li><p><strong>kneeLow</strong> – The size of the knee for companding below the low threshold (in Dbs) </p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>a companded signal </p>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N12maxiDynamics8compressEdddd">
<span id="_CPPv3N12maxiDynamics8compressEdddd"></span><span id="_CPPv2N12maxiDynamics8compressEdddd"></span><span id="maxiDynamics::compress__double.double.double.double"></span><span class="target" id="classmaxiDynamics_1a14785d18672ec3c94481e1bd8bc6ed7d"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">compress</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">sig</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">threshold</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">ratio</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">knee</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N12maxiDynamics8compressEdddd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Compress a signal (using downward compression) </p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>sig</strong> – The input signal to be compressed </p></li>
<li><p><strong>threshold</strong> – The threshold, in Dbs </p></li>
<li><p><strong>ratio</strong> – The compression ratio (&gt;1 provides compression, &lt;1 provides expansion) </p></li>
<li><p><strong>knee</strong> – The size of the knee (in Dbs) </p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>a compressed signal </p>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N12maxiDynamics17sidechainCompressEddddd">
<span id="_CPPv3N12maxiDynamics17sidechainCompressEddddd"></span><span id="_CPPv2N12maxiDynamics17sidechainCompressEddddd"></span><span id="maxiDynamics::sidechainCompress__double.double.double.double.double"></span><span class="target" id="classmaxiDynamics_1a37af4d24f186e53efbad57903a028056"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">sidechainCompress</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">sig</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">control</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">threshold</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">ratio</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">knee</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N12maxiDynamics17sidechainCompressEddddd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Compress a signal with sidechaining (using downward compression) </p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>sig</strong> – The input signal to be compressed </p></li>
<li><p><strong>control</strong> – The sidechain signal </p></li>
<li><p><strong>threshold</strong> – The threshold, in Dbs </p></li>
<li><p><strong>ratio</strong> – The compression ratio (&gt;1 provides compression, &lt;1 provides expansion) </p></li>
<li><p><strong>knee</strong> – The size of the knee (in Dbs) </p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>a compressed signal </p>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N12maxiDynamics12compandAboveEddddd">
<span id="_CPPv3N12maxiDynamics12compandAboveEddddd"></span><span id="_CPPv2N12maxiDynamics12compandAboveEddddd"></span><span id="maxiDynamics::compandAbove__double.double.double.double.double"></span><span class="target" id="classmaxiDynamics_1a3512c121bbf43b379205616ec07e6584"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">compandAbove</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">sig</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">control</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">threshold</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">ratio</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">knee</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N12maxiDynamics12compandAboveEddddd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Compand a signal, using detection above a threshold (provides downward compression or upward expansion) </p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>sig</strong> – The input signal to be compressed </p></li>
<li><p><strong>control</strong> – The sidechain signal </p></li>
<li><p><strong>threshold</strong> – The threshold, in Dbs </p></li>
<li><p><strong>ratio</strong> – The compression ratio (&gt;1 provides compression, &lt;1 provides expansion) </p></li>
<li><p><strong>knee</strong> – The size of the knee (in Dbs) </p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>a companded signal </p>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N12maxiDynamics12compandBelowEddddd">
<span id="_CPPv3N12maxiDynamics12compandBelowEddddd"></span><span id="_CPPv2N12maxiDynamics12compandBelowEddddd"></span><span id="maxiDynamics::compandBelow__double.double.double.double.double"></span><span class="target" id="classmaxiDynamics_1a14133dec6e29ea14f8b1e96dbe8aadec"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">compandBelow</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">sig</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">control</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">threshold</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">ratio</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">knee</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N12maxiDynamics12compandBelowEddddd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Compand a signal, using detection below a threshold (provides upward compression or downward expansion) </p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>sig</strong> – The input signal to be compressed </p></li>
<li><p><strong>control</strong> – The sidechain signal </p></li>
<li><p><strong>threshold</strong> – The threshold, in Dbs </p></li>
<li><p><strong>ratio</strong> – The compression ratio (&gt;1 provides compression, &lt;1 provides expansion) </p></li>
<li><p><strong>knee</strong> – The size of the knee (in Dbs) </p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>a companded signal </p>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N12maxiDynamics13setAttackHighEd">
<span id="_CPPv3N12maxiDynamics13setAttackHighEd"></span><span id="_CPPv2N12maxiDynamics13setAttackHighEd"></span><span id="maxiDynamics::setAttackHigh__double"></span><span class="target" id="classmaxiDynamics_1a0273d2650b89b9479a4f2edc6c6199fe"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">void</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">setAttackHigh</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">attack</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N12maxiDynamics13setAttackHighEd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Set the attack time for the high threshold. This is the amount of time over which the ratio moves from 1 to its full value, following the input analyser going over the threshold. </p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>attack</strong> – The attack time (in milliseconds) </p>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N12maxiDynamics14setReleaseHighEd">
<span id="_CPPv3N12maxiDynamics14setReleaseHighEd"></span><span id="_CPPv2N12maxiDynamics14setReleaseHighEd"></span><span id="maxiDynamics::setReleaseHigh__double"></span><span class="target" id="classmaxiDynamics_1a404880950607546bc14b42841114a658"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">void</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">setReleaseHigh</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">release</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N12maxiDynamics14setReleaseHighEd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Set the release time for the high threshold. This is the amount of time over which the ratio moves from its full value to 1, following the input analyser going under the threshold. </p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>release</strong> – The release time (in milliseconds) </p>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N12maxiDynamics12setAttackLowEd">
<span id="_CPPv3N12maxiDynamics12setAttackLowEd"></span><span id="_CPPv2N12maxiDynamics12setAttackLowEd"></span><span id="maxiDynamics::setAttackLow__double"></span><span class="target" id="classmaxiDynamics_1aa76adf63dbc2787b4b371ec5004a046d"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">void</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">setAttackLow</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">attack</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N12maxiDynamics12setAttackLowEd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Set the attack time for the low threshold. This is the amount of time over which the ratio moves from 1 to its full value, following the input analyser going under the threshold. </p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>attack</strong> – The attack time (in milliseconds) </p>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N12maxiDynamics13setReleaseLowEd">
<span id="_CPPv3N12maxiDynamics13setReleaseLowEd"></span><span id="_CPPv2N12maxiDynamics13setReleaseLowEd"></span><span id="maxiDynamics::setReleaseLow__double"></span><span class="target" id="classmaxiDynamics_1a3a12966b1242cd305e1ae1f469ec8b73"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">void</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">setReleaseLow</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">release</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N12maxiDynamics13setReleaseLowEd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Set the release time for the low threshold. This is the amount of time over which the ratio moves from its full value to 1, following the input analyser going over the threshold. </p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>release</strong> – The release time (in milliseconds) </p>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N12maxiDynamics12setLookAheadEd">
<span id="_CPPv3N12maxiDynamics12setLookAheadEd"></span><span id="_CPPv2N12maxiDynamics12setLookAheadEd"></span><span id="maxiDynamics::setLookAhead__double"></span><span class="target" id="classmaxiDynamics_1a82b54fa78fd19796049ebe33f798b4c2"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">void</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">setLookAhead</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">length</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N12maxiDynamics12setLookAheadEd" title="Permalink to this definition"></a><br /></dt>
<dd><p>The look ahead creates a delay on the input signal, meaning that that the signal is compressed according to event that have already happened in the control signal. This can be useful for limiting and catching fast transients. </p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>length</strong> – The amount of time the compressor looks ahead (in milliseconds) </p>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N12maxiDynamics12getLookAheadEv">
<span id="_CPPv3N12maxiDynamics12getLookAheadEv"></span><span id="_CPPv2N12maxiDynamics12getLookAheadEv"></span><span id="maxiDynamics::getLookAhead"></span><span class="target" id="classmaxiDynamics_1a120d14fe57e3174e02ba9983c4f605a0"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">getLookAhead</span></span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N12maxiDynamics12getLookAheadEv" title="Permalink to this definition"></a><br /></dt>
<dd><dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>the look ahead time (in milliseconds) </p>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N12maxiDynamics16setRMSWindowSizeEd">
<span id="_CPPv3N12maxiDynamics16setRMSWindowSizeEd"></span><span id="_CPPv2N12maxiDynamics16setRMSWindowSizeEd"></span><span id="maxiDynamics::setRMSWindowSize__double"></span><span class="target" id="classmaxiDynamics_1afa1ab43b86ed583064a4d09fc2fcc56f"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">void</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">setRMSWindowSize</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">winSize</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N12maxiDynamics16setRMSWindowSizeEd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Set the size of the RMS window. Longer times give a slower response </p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>winSize</strong> – The size of the window (in milliseconds) </p>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N12maxiDynamics16setInputAnalyserE9ANALYSERS">
<span id="_CPPv3N12maxiDynamics16setInputAnalyserE9ANALYSERS"></span><span id="_CPPv2N12maxiDynamics16setInputAnalyserE9ANALYSERS"></span><span id="maxiDynamics::setInputAnalyser__ANALYSERS"></span><span class="target" id="classmaxiDynamics_1a90493175c8e190322d1da6ca20f3403c"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">void</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">setInputAnalyser</span></span></span><span class="sig-paren">(</span><span class="n"><span class="pre">ANALYSERS</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">mode</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N12maxiDynamics16setInputAnalyserE9ANALYSERS" title="Permalink to this definition"></a><br /></dt>
<dd><p>Set the method by which the compressor analyses the control input \mode maxiDynamics::PEAK for peak analysis, maxiDynamics::RMS for rms analysis </p>
</dd></dl>

</div>
</dd></dl>

</section>
<section id="effects">
<h2>Effects<a class="headerlink" href="#effects" title="Permalink to this heading"></a></h2>
<dl class="cpp class">
<dt class="sig sig-object cpp" id="_CPPv413maxiDelayline">
<span id="_CPPv313maxiDelayline"></span><span id="_CPPv213maxiDelayline"></span><span id="maxiDelayline"></span><span class="target" id="classmaxiDelayline"></span><span class="k"><span class="pre">class</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">maxiDelayline</span></span></span><a class="headerlink" href="#_CPPv413maxiDelayline" title="Permalink to this definition"></a><br /></dt>
<dd><p>A delay line </p>
<div class="breathe-sectiondef docutils container">
<p class="breathe-sectiondef-title rubric" id="breathe-section-title-public-functions">Public Functions</p>
<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N13maxiDelayline2dlEdid">
<span id="_CPPv3N13maxiDelayline2dlEdid"></span><span id="_CPPv2N13maxiDelayline2dlEdid"></span><span id="maxiDelayline::dl__double.i.double"></span><span class="target" id="classmaxiDelayline_1a262f9a52fc6d7c087caaae350779f956"></span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">dl</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">input</span></span>, <span class="kt"><span class="pre">int</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">size</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">feedback</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N13maxiDelayline2dlEdid" title="Permalink to this definition"></a><br /></dt>
<dd><p>Apply a delay to a signal</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>input</strong> – a signal,</p></li>
<li><p><strong>size</strong> – the size of the delay in samples</p></li>
<li><p><strong>feedback</strong> – the amount of feedback </p></li>
</ul>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N13maxiDelayline14dlFromPositionEdidi">
<span id="_CPPv3N13maxiDelayline14dlFromPositionEdidi"></span><span id="_CPPv2N13maxiDelayline14dlFromPositionEdidi"></span><span id="maxiDelayline::dlFromPosition__double.i.double.i"></span><span class="target" id="classmaxiDelayline_1a8db792dd66742c0b91567efffd2fb09e"></span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">dlFromPosition</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">input</span></span>, <span class="kt"><span class="pre">int</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">size</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">feedback</span></span>, <span class="kt"><span class="pre">int</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">position</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N13maxiDelayline14dlFromPositionEdidi" title="Permalink to this definition"></a><br /></dt>
<dd><p>Apply a delay to a signal, reading from a specific position in the buffer </p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>input</strong> – a signal,</p></li>
<li><p><strong>size</strong> – the size of the delay in samples</p></li>
<li><p><strong>feedback</strong> – the amount of feedback </p></li>
<li><p><strong>position</strong> – the position in the buffer (in samples) </p></li>
</ul>
</dd>
</dl>
</dd></dl>

</div>
</dd></dl>

<dl class="cpp class">
<dt class="sig sig-object cpp" id="_CPPv416maxiNonlinearity">
<span id="_CPPv316maxiNonlinearity"></span><span id="_CPPv216maxiNonlinearity"></span><span id="maxiNonlinearity"></span><span class="target" id="classmaxiNonlinearity"></span><span class="k"><span class="pre">class</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">maxiNonlinearity</span></span></span><a class="headerlink" href="#_CPPv416maxiNonlinearity" title="Permalink to this definition"></a><br /></dt>
<dd><p>Various ways to distort signals </p>
<div class="breathe-sectiondef docutils container">
<p class="breathe-sectiondef-title rubric" id="breathe-section-title-public-functions">Public Functions</p>
<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N16maxiNonlinearity8atanDistEKdKd">
<span id="_CPPv3N16maxiNonlinearity8atanDistEKdKd"></span><span id="_CPPv2N16maxiNonlinearity8atanDistEKdKd"></span><span id="maxiNonlinearity::atanDist__doubleC.doubleC"></span><span class="target" id="classmaxiNonlinearity_1a7768ef4e151832457efe388109ff8145"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">atanDist</span></span></span><span class="sig-paren">(</span><span class="k"><span class="pre">const</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">in</span></span>, <span class="k"><span class="pre">const</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">shape</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N16maxiNonlinearity8atanDistEKdKd" title="Permalink to this definition"></a><br /></dt>
<dd><p>atan distortion, see <a class="reference external" href="http://www.musicdsp.org/showArchiveComment.php?ArchiveID=104">http://www.musicdsp.org/showArchiveComment.php?ArchiveID=104</a> </p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>in</strong> – A signal </p></li>
<li><p><strong>shape</strong> – from 1 (soft clipping) to infinity (hard clipping) </p></li>
</ul>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N16maxiNonlinearity12fastAtanDistEKdKd">
<span id="_CPPv3N16maxiNonlinearity12fastAtanDistEKdKd"></span><span id="_CPPv2N16maxiNonlinearity12fastAtanDistEKdKd"></span><span id="maxiNonlinearity::fastAtanDist__doubleC.doubleC"></span><span class="target" id="classmaxiNonlinearity_1a7925d5eeeac8953db220c2ed121b323e"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">fastAtanDist</span></span></span><span class="sig-paren">(</span><span class="k"><span class="pre">const</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">in</span></span>, <span class="k"><span class="pre">const</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">shape</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N16maxiNonlinearity12fastAtanDistEKdKd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Faster but ‘lower quality’ version of atan distortion </p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>in</strong> – A signal </p></li>
<li><p><strong>shape</strong> – from 1 (soft clipping) to infinity (hard clipping) </p></li>
</ul>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N16maxiNonlinearity8softclipEd">
<span id="_CPPv3N16maxiNonlinearity8softclipEd"></span><span id="_CPPv2N16maxiNonlinearity8softclipEd"></span><span id="maxiNonlinearity::softclip__double"></span><span class="target" id="classmaxiNonlinearity_1af31dae57b366bf898eaee24f06d146f6"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">softclip</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">x</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N16maxiNonlinearity8softclipEd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Cliping with nicer harmonics</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>x</strong> – A signal </p>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N16maxiNonlinearity8hardclipEd">
<span id="_CPPv3N16maxiNonlinearity8hardclipEd"></span><span id="_CPPv2N16maxiNonlinearity8hardclipEd"></span><span id="maxiNonlinearity::hardclip__double"></span><span class="target" id="classmaxiNonlinearity_1ad256eefc5e3cfbe70ad22cf105e187cc"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">hardclip</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">x</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N16maxiNonlinearity8hardclipEd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Cliping with nastier harmonics</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>x</strong> – A signal </p>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N16maxiNonlinearity8asymclipEddd">
<span id="_CPPv3N16maxiNonlinearity8asymclipEddd"></span><span id="_CPPv2N16maxiNonlinearity8asymclipEddd"></span><span id="maxiNonlinearity::asymclip__double.double.double"></span><span class="target" id="classmaxiNonlinearity_1aa8e54b18b54b7dca2f0bfb0171e038cd"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">asymclip</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">x</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">a</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">b</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N16maxiNonlinearity8asymclipEddd" title="Permalink to this definition"></a><br /></dt>
<dd><p>asymmetric clipping: chose the shape of curves for both positive and negative values of x try it here <a class="reference external" href="https://www.desmos.com/calculator/to6eixatsa">https://www.desmos.com/calculator/to6eixatsa</a> </p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>x</strong> – A signal </p></li>
<li><p><strong>a</strong> – Exponent for the positive curve </p></li>
<li><p><strong>b</strong> – Exponent for the negative curve </p></li>
</ul>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N16maxiNonlinearity8fastatanEd">
<span id="_CPPv3N16maxiNonlinearity8fastatanEd"></span><span id="_CPPv2N16maxiNonlinearity8fastatanEd"></span><span id="maxiNonlinearity::fastatan__double"></span><span class="target" id="classmaxiNonlinearity_1a010c469f179b4bbca35755219063b217"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">fastatan</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">x</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N16maxiNonlinearity8fastatanEd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Fast atan distortion</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>x</strong> – A signal </p>
</dd>
</dl>
</dd></dl>

</div>
</dd></dl>

<dl class="cpp class">
<dt class="sig sig-object cpp" id="_CPPv417maxiSampleAndHold">
<span id="_CPPv317maxiSampleAndHold"></span><span id="_CPPv217maxiSampleAndHold"></span><span id="maxiSampleAndHold"></span><span class="target" id="classmaxiSampleAndHold"></span><span class="k"><span class="pre">class</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">maxiSampleAndHold</span></span></span><a class="headerlink" href="#_CPPv417maxiSampleAndHold" title="Permalink to this definition"></a><br /></dt>
<dd><p>Sample and hold effect: samples the input signal periodically and outputs that value </p>
<div class="breathe-sectiondef docutils container">
<p class="breathe-sectiondef-title rubric" id="breathe-section-title-public-functions">Public Functions</p>
<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N17maxiSampleAndHold3sahEdd">
<span id="_CPPv3N17maxiSampleAndHold3sahEdd"></span><span id="_CPPv2N17maxiSampleAndHold3sahEdd"></span><span id="maxiSampleAndHold::sah__double.double"></span><span class="target" id="classmaxiSampleAndHold_1a5271ce0f72e21dc33469cd73abf5985f"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">sah</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">sigIn</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">holdTimeMs</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N17maxiSampleAndHold3sahEdd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Process a signal</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>sigIn</strong> – a signal</p></li>
<li><p><strong>holdTimeMs</strong> – The length of the sampling period </p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>the sampled signal </p>
</dd>
</dl>
</dd></dl>

</div>
</dd></dl>

</section>
<section id="analysis">
<h2>Analysis<a class="headerlink" href="#analysis" title="Permalink to this heading"></a></h2>
<dl class="cpp class">
<dt class="sig sig-object cpp" id="_CPPv424maxiZeroCrossingDetector">
<span id="_CPPv324maxiZeroCrossingDetector"></span><span id="_CPPv224maxiZeroCrossingDetector"></span><span id="maxiZeroCrossingDetector"></span><span class="target" id="classmaxiZeroCrossingDetector"></span><span class="k"><span class="pre">class</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">maxiZeroCrossingDetector</span></span></span><a class="headerlink" href="#_CPPv424maxiZeroCrossingDetector" title="Permalink to this definition"></a><br /></dt>
<dd><p>Detect positive zero-crossings: the point in time when a signal transitions from 0 or less, to above zero </p>
<div class="breathe-sectiondef docutils container">
<p class="breathe-sectiondef-title rubric" id="breathe-section-title-public-functions">Public Functions</p>
<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N24maxiZeroCrossingDetector2zxEd">
<span id="_CPPv3N24maxiZeroCrossingDetector2zxEd"></span><span id="_CPPv2N24maxiZeroCrossingDetector2zxEd"></span><span id="maxiZeroCrossingDetector::zx__double"></span><span class="target" id="classmaxiZeroCrossingDetector_1aa7910490989a6a12655ee083fece2eeb"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">bool</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">zx</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">x</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N24maxiZeroCrossingDetector2zxEd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Returns true when a positive zero-crossing occurs, othersize false</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>x</strong> – A signal </p>
</dd>
</dl>
</dd></dl>

</div>
</dd></dl>

<dl class="cpp class">
<dt class="sig sig-object cpp" id="_CPPv420maxiZeroCrossingRate">
<span id="_CPPv320maxiZeroCrossingRate"></span><span id="_CPPv220maxiZeroCrossingRate"></span><span id="maxiZeroCrossingRate"></span><span class="target" id="classmaxiZeroCrossingRate"></span><span class="k"><span class="pre">class</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">maxiZeroCrossingRate</span></span></span><a class="headerlink" href="#_CPPv420maxiZeroCrossingRate" title="Permalink to this definition"></a><br /></dt>
<dd><p>Calculate the zero crossing rate of a signal This is a fairly crude measure of frequency, which is confounded by complex waveforms and noise </p>
<div class="breathe-sectiondef docutils container">
<p class="breathe-sectiondef-title rubric" id="breathe-section-title-public-functions">Public Functions</p>
<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N20maxiZeroCrossingRate4playEd">
<span id="_CPPv3N20maxiZeroCrossingRate4playEd"></span><span id="_CPPv2N20maxiZeroCrossingRate4playEd"></span><span id="maxiZeroCrossingRate::play__double"></span><span class="target" id="classmaxiZeroCrossingRate_1a0d64e5805124f957b1c9c8b19024d477"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">play</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">signal</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N20maxiZeroCrossingRate4playEd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Calculate the zero cross rate</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>signal</strong> – a signal </p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>the zero crossing rate in Hz </p>
</dd>
</dl>
</dd></dl>

</div>
</dd></dl>

<dl class="cpp class">
<dt class="sig sig-object cpp" id="_CPPv47maxiRMS">
<span id="_CPPv37maxiRMS"></span><span id="_CPPv27maxiRMS"></span><span id="maxiRMS"></span><span class="target" id="classmaxiRMS"></span><span class="k"><span class="pre">class</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">maxiRMS</span></span></span><a class="headerlink" href="#_CPPv47maxiRMS" title="Permalink to this definition"></a><br /></dt>
<dd><p>Calculate the Root Mean Square of a signal over a window of time This is a good measurement of the amount of power in a signal </p>
<div class="breathe-sectiondef docutils container">
<p class="breathe-sectiondef-title rubric" id="breathe-section-title-public-functions">Public Functions</p>
<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N7maxiRMS5setupEdd">
<span id="_CPPv3N7maxiRMS5setupEdd"></span><span id="_CPPv2N7maxiRMS5setupEdd"></span><span id="maxiRMS::setup__double.double"></span><span class="target" id="classmaxiRMS_1a83f8273f50317de69ddd4ee85643126b"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">void</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">setup</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">maxLength</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">windowSize</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N7maxiRMS5setupEdd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Configure the analyser</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>maxLength</strong> – The maximum length of time to analyse (ms)</p></li>
<li><p><strong>windowSize</strong> – The size of the window of time to analyse initially (ms, &lt;= maxLength) </p></li>
</ul>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N7maxiRMS13setWindowSizeEd">
<span id="_CPPv3N7maxiRMS13setWindowSizeEd"></span><span id="_CPPv2N7maxiRMS13setWindowSizeEd"></span><span id="maxiRMS::setWindowSize__double"></span><span class="target" id="classmaxiRMS_1acb19557702eae3155ae190e1519c8fe6"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">void</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">setWindowSize</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">newWindowSize</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N7maxiRMS13setWindowSizeEd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Set the size of the analysis window</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>newWindowSize</strong> – the size of the analysis window (in ms). Large values will smooth out the measurement, and make it less responsive to transients </p>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N7maxiRMS13getWindowSizeEv">
<span id="_CPPv3N7maxiRMS13getWindowSizeEv"></span><span id="_CPPv2N7maxiRMS13getWindowSizeEv"></span><span id="maxiRMS::getWindowSize"></span><span class="target" id="classmaxiRMS_1ab262cc704a1720a34b5aba4553bf905e"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">getWindowSize</span></span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N7maxiRMS13getWindowSizeEv" title="Permalink to this definition"></a><br /></dt>
<dd><p>Find out the size of the analysis window (in ms) </p>
</dd></dl>

</div>
</dd></dl>

</section>
<section id="sequencing">
<h2>Sequencing<a class="headerlink" href="#sequencing" title="Permalink to this heading"></a></h2>
<dl class="cpp class">
<dt class="sig sig-object cpp" id="_CPPv48maxiStep">
<span id="_CPPv38maxiStep"></span><span id="_CPPv28maxiStep"></span><span id="maxiStep"></span><span class="target" id="classmaxiStep"></span><span class="k"><span class="pre">class</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">maxiStep</span></span></span><a class="headerlink" href="#_CPPv48maxiStep" title="Permalink to this definition"></a><br /></dt>
<dd><p>Pull sequential values from an array </p>
<div class="breathe-sectiondef docutils container">
<p class="breathe-sectiondef-title rubric" id="breathe-section-title-public-functions">Public Functions</p>
<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N8maxiStep4pullEKd11DOUBLEARRAYd">
<span id="_CPPv3N8maxiStep4pullEKd11DOUBLEARRAYd"></span><span id="_CPPv2N8maxiStep4pullEKd11DOUBLEARRAYd"></span><span id="maxiStep::pull__doubleC.DOUBLEARRAY.double"></span><span class="target" id="classmaxiStep_1a86b0a93a6367bf5cce8f653368538341"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">pull</span></span></span><span class="sig-paren">(</span><span class="k"><span class="pre">const</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">trigSig</span></span>, <span class="n"><span class="pre">DOUBLEARRAY</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">values</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">step</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N8maxiStep4pullEKd11DOUBLEARRAYd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Take values from the array when triggered </p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>trigSig</strong> – A signal to trigger a new value on a positive zero crossing </p></li>
<li><p><strong>values</strong> – An array of values \step The amount that the array index should increase after pulling a new value. This wraps around to zero at the end of the array </p></li>
</ul>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N8maxiStep8getIndexEv">
<span id="_CPPv3N8maxiStep8getIndexEv"></span><span id="_CPPv2N8maxiStep8getIndexEv"></span><span id="maxiStep::getIndex"></span><span class="target" id="classmaxiStep_1a8b790d681ec903dd8b432d7fc0bb3427"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">getIndex</span></span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N8maxiStep8getIndexEv" title="Permalink to this definition"></a><br /></dt>
<dd><p>Get the current array index </p>
</dd></dl>

</div>
</dd></dl>

</section>
<section id="utility-functions">
<h2>Utility Functions<a class="headerlink" href="#utility-functions" title="Permalink to this heading"></a></h2>
<dl class="cpp class">
<dt class="sig sig-object cpp" id="_CPPv48maxiPoll">
<span id="_CPPv38maxiPoll"></span><span id="_CPPv28maxiPoll"></span><span id="maxiPoll"></span><span class="target" id="classmaxiPoll"></span><span class="k"><span class="pre">class</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">maxiPoll</span></span></span><a class="headerlink" href="#_CPPv48maxiPoll" title="Permalink to this definition"></a><br /></dt>
<dd><p>Poll values to stdout at regular intervals </p>
<div class="breathe-sectiondef docutils container">
<p class="breathe-sectiondef-title rubric" id="breathe-section-title-public-functions">Public Functions</p>
<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N8maxiPoll4pollEdd6string6string">
<span id="_CPPv3N8maxiPoll4pollEdd6string6string"></span><span id="_CPPv2N8maxiPoll4pollEdd6string6string"></span><span id="maxiPoll::poll__double.double.string.string"></span><span class="target" id="classmaxiPoll_1a7e72b3804fef19771d40c2bb90b37ba8"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">poll</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">val</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">frequency</span></span><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="m"><span class="pre">4</span></span>, <span class="n"><span class="pre">string</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">txt</span></span><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="s"><span class="pre">&quot;&quot;</span></span>, <span class="n"><span class="pre">string</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">end</span></span><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="s"><span class="pre">&quot;\n&quot;</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N8maxiPoll4pollEdd6string6string" title="Permalink to this definition"></a><br /></dt>
<dd><dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>val</strong> – The value to poll </p></li>
<li><p><strong>frequency</strong> – How often to print this value (Hz) </p></li>
<li><p><strong>txt</strong> – Additional text to br printed before the value </p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>the value being polled, so this can used as a pass-through function e.g. filter.play(obj.poll(osc.saw(2)),0.5) </p>
</dd>
</dl>
</dd></dl>

</div>
</dd></dl>

<dl class="cpp class">
<dt class="sig sig-object cpp" id="_CPPv411maxiConvert">
<span id="_CPPv311maxiConvert"></span><span id="_CPPv211maxiConvert"></span><span id="maxiConvert"></span><span class="target" id="classmaxiConvert"></span><span class="k"><span class="pre">class</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">maxiConvert</span></span></span><a class="headerlink" href="#_CPPv411maxiConvert" title="Permalink to this definition"></a><br /></dt>
<dd><p>Conversion functions </p>
<div class="breathe-sectiondef docutils container">
<p class="breathe-sectiondef-title rubric" id="breathe-section-title-public-static-functions">Public Static Functions</p>
<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N11maxiConvert4mtofEi">
<span id="_CPPv3N11maxiConvert4mtofEi"></span><span id="_CPPv2N11maxiConvert4mtofEi"></span><span id="maxiConvert::mtof__i"></span><span class="target" id="classmaxiConvert_1a297c99035cb6a4727654133d792c22e1"></span><span class="k"><span class="pre">static</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">mtof</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">int</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">midinote</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N11maxiConvert4mtofEi" title="Permalink to this definition"></a><br /></dt>
<dd><p>Convert from MIDI note number to frequency (Hz)</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>midinote</strong> – A MIDI note number </p>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N11maxiConvert9msToSampsEd">
<span id="_CPPv3N11maxiConvert9msToSampsEd"></span><span id="_CPPv2N11maxiConvert9msToSampsEd"></span><span id="maxiConvert::msToSamps__double"></span><span class="target" id="classmaxiConvert_1acafb7f84fc30c76960a2b0025ad754b8"></span><span class="k"><span class="pre">static</span></span><span class="w"> </span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="n"><span class="pre">size_t</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">msToSamps</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">timeMs</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N11maxiConvert9msToSampsEd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Convert from milliseconds to samples</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>timeMs</strong> – The number of milliseconds </p>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N11maxiConvert9sampsToMsE6size_t">
<span id="_CPPv3N11maxiConvert9sampsToMsE6size_t"></span><span id="_CPPv2N11maxiConvert9sampsToMsE6size_t"></span><span id="maxiConvert::sampsToMs__s"></span><span class="target" id="classmaxiConvert_1a3a38c2c0d8943dfba338e6eda687b0d3"></span><span class="k"><span class="pre">static</span></span><span class="w"> </span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">sampsToMs</span></span></span><span class="sig-paren">(</span><span class="n"><span class="pre">size_t</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">samples</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N11maxiConvert9sampsToMsE6size_t" title="Permalink to this definition"></a><br /></dt>
<dd><p>Convert from samples to milliseconds</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>samples</strong> – The number of samples </p>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N11maxiConvert8ampToDbsEd">
<span id="_CPPv3N11maxiConvert8ampToDbsEd"></span><span id="_CPPv2N11maxiConvert8ampToDbsEd"></span><span id="maxiConvert::ampToDbs__double"></span><span class="target" id="classmaxiConvert_1a8048c8af50733d0ff5cadeae82955397"></span><span class="k"><span class="pre">static</span></span><span class="w"> </span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">ampToDbs</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">amp</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N11maxiConvert8ampToDbsEd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Convert from amplitude to decibels</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>amp</strong> – Amplitude </p>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N11maxiConvert8dbsToAmpEd">
<span id="_CPPv3N11maxiConvert8dbsToAmpEd"></span><span id="_CPPv2N11maxiConvert8dbsToAmpEd"></span><span id="maxiConvert::dbsToAmp__double"></span><span class="target" id="classmaxiConvert_1ab3caacc73f0a612e458181bd721dcc1f"></span><span class="k"><span class="pre">static</span></span><span class="w"> </span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">dbsToAmp</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">dbs</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N11maxiConvert8dbsToAmpEd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Convert from decibels to amplitude</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>dbs</strong> – Decibels </p>
</dd>
</dl>
</dd></dl>

</div>
</dd></dl>

<dl class="cpp class">
<dt class="sig sig-object cpp" id="_CPPv411maxiRingBuf">
<span id="_CPPv311maxiRingBuf"></span><span id="_CPPv211maxiRingBuf"></span><span id="maxiRingBuf"></span><span class="target" id="classmaxiRingBuf"></span><span class="k"><span class="pre">class</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">maxiRingBuf</span></span></span><a class="headerlink" href="#_CPPv411maxiRingBuf" title="Permalink to this definition"></a><br /></dt>
<dd><p>A ring buffer. This enables you to look at the last N values in a time series. </p>
<div class="breathe-sectiondef docutils container">
<p class="breathe-sectiondef-title rubric" id="breathe-section-title-public-functions">Public Functions</p>
<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N11maxiRingBuf5setupE6size_t">
<span id="_CPPv3N11maxiRingBuf5setupE6size_t"></span><span id="_CPPv2N11maxiRingBuf5setupE6size_t"></span><span id="maxiRingBuf::setup__s"></span><span class="target" id="classmaxiRingBuf_1af577d377112b3e7cf10aeb38cbbf977b"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">void</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">setup</span></span></span><span class="sig-paren">(</span><span class="n"><span class="pre">size_t</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">N</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N11maxiRingBuf5setupE6size_t" title="Permalink to this definition"></a><br /></dt>
<dd><p>Allocate memory for the buffer</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>N</strong> – The maximum length of the buffer </p>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N11maxiRingBuf4pushEd">
<span id="_CPPv3N11maxiRingBuf4pushEd"></span><span id="_CPPv2N11maxiRingBuf4pushEd"></span><span id="maxiRingBuf::push__double"></span><span class="target" id="classmaxiRingBuf_1acbb50ba3f6d06388276ac407500af474"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">void</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">push</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">x</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N11maxiRingBuf4pushEd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Add the latest value to the buffer</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>x</strong> – A value </p>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N11maxiRingBuf4sizeEv">
<span id="_CPPv3N11maxiRingBuf4sizeEv"></span><span id="_CPPv2N11maxiRingBuf4sizeEv"></span><span id="maxiRingBuf::size"></span><span class="target" id="classmaxiRingBuf_1ab73fc50129d00cc859110984095e7ea9"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="n"><span class="pre">size_t</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">size</span></span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N11maxiRingBuf4sizeEv" title="Permalink to this definition"></a><br /></dt>
<dd><dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>The size of the buffer </p>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N11maxiRingBuf4headEv">
<span id="_CPPv3N11maxiRingBuf4headEv"></span><span id="_CPPv2N11maxiRingBuf4headEv"></span><span id="maxiRingBuf::head"></span><span class="target" id="classmaxiRingBuf_1a37a316f7a7d30b80674f53dd2cdd83ed"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">head</span></span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N11maxiRingBuf4headEv" title="Permalink to this definition"></a><br /></dt>
<dd><dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>the value at the front of the buffer </p>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N11maxiRingBuf4tailE6size_t">
<span id="_CPPv3N11maxiRingBuf4tailE6size_t"></span><span id="_CPPv2N11maxiRingBuf4tailE6size_t"></span><span id="maxiRingBuf::tail__s"></span><span class="target" id="classmaxiRingBuf_1a6b3245facdc13657159d487f93aa4851"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">tail</span></span></span><span class="sig-paren">(</span><span class="n"><span class="pre">size_t</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">N</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N11maxiRingBuf4tailE6size_t" title="Permalink to this definition"></a><br /></dt>
<dd><dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>N</strong> – The size of the window, N &lt; the size of the buffer </p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>the oldest value in the buffer, for a particular window size</p>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N11maxiRingBuf6reduceE6size_t14reduceFunctiond">
<span id="_CPPv3N11maxiRingBuf6reduceE6size_t14reduceFunctiond"></span><span id="_CPPv2N11maxiRingBuf6reduceE6size_t14reduceFunctiond"></span><span id="maxiRingBuf::reduce__s.reduceFunction.double"></span><span class="target" id="classmaxiRingBuf_1ab05fffc8720e0d8c7dc748299f2a5735"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">reduce</span></span></span><span class="sig-paren">(</span><span class="n"><span class="pre">size_t</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">N</span></span>, <span class="n"><span class="pre">reduceFunction</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">func</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">initval</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N11maxiRingBuf6reduceE6size_t14reduceFunctiond" title="Permalink to this definition"></a><br /></dt>
<dd><p>Apply a function of the previous N values in the buffer </p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>N</strong> – The number of values in the window </p></li>
<li><p><strong>func</strong> – A function in the form double func(double previousResult, double nextValue) </p></li>
<li><p><strong>initval</strong> – The initial value to pass into the function (usually 0) </p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>The last result of the function, after passing in all values from the window Example: this function will sum the values in the window: auto sumfunc = [](double val, double n) {return val + n;}; </p>
</dd>
</dl>
</dd></dl>

</div>
</dd></dl>

</section>
</section>


           </div>
          </div>
          <footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
        <a href="install.html" class="btn btn-neutral float-left" title="Installation" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
        <a href="extended.html" class="btn btn-neutral float-right" title="Extended" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
    </div>

  <hr/>

  <div role="contentinfo">
    <p>&#169; Copyright 2008 onwards.</p>
  </div>

  Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
    <a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
    provided by <a href="https://readthedocs.org">Read the Docs</a>.
   

</footer>
        </div>
      </div>
    </section>
  </div>
  <script>
      jQuery(function () {
          SphinxRtdTheme.Navigation.enable(true);
      });
  </script> 

</body>
</html>